<#include "/common/include.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增OA请假单">
</@header>
<@addorEdit fromId="form-form-add">
    <input  type="hidden" name="userId" value="${user.id}">
    <input  type="hidden" name="userName" value="${user.name}">
     <input  type="hidden" name="modelKey" value="${bpmTaskFrom.modelKey}">
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "表单名称"/>：</label>
        <div class="col-sm-8">
            <input name="fromName"  value="${bpmTaskFrom.fromName}" class="form-control" type="text" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "开始时间"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="startTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  required>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "结束时间"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="endTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  required>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "请假天数"/>：
                         </label>
        <div class="col-sm-8">
            <input name="leaveDays" class="form-control" type="text" required>
                            </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "请假类型"/>：</label>
        <div class="col-sm-8">
            <select id="leaveType" name="leaveType" class="form-control">
                <#list dict.getType('sys_leave_type')>
                    <#items as d>
                        <#if d.status =='0' >
                           <option  value="${d.dictValue}" text="${d.dictLabel}">${d.dictLabel}</option>
                        </#if>
                    </#items>
                 </#list>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "请假原因"/>：</label>
        <div class="col-sm-8">
            <textarea name="leaveReason" class="form-control" required></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备注"/>：
                         </label>
        <div class="col-sm-8">
            <input name="remark" class="form-control" type="text">
                            </div>
    </div>
</@addorEdit>
<@footer>
    <script type="text/javascript">
        var prefix = baseURL + "bpm/form"
        $("#form-form-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if (opt.validate.form()) {
                opt.operate.save(prefix + "/add", $('#form-form-add').serialize());
            }
        }
</script>
</@footer>
</@pageTheme>